//
//  RecTableViewCell.m
//  HumorousScripts
//
//  Created by 李欢 on 15/6/16.
//  Copyright (c) 2015年 李欢. All rights reserved.
//

#import "RecTableViewCell.h"

#define Width [UIScreen mainScreen].bounds.size.width
#define Height [UIScreen mainScreen].bounds.size.height

@implementation RecTableViewCell

- (void)awakeFromNib {
  
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if ( self) {
        
        self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(10/375.0*Width, 10/667.0*Height, 40/375.0*Width, 40/667.0*Height)];
        //        图片变成圆角
        self.imageview.layer.cornerRadius = 20;
        self.imageview.clipsToBounds = YES;
        
        //        名字
        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(60/375.0*Width, 10/667.0*Height, 300/375.0*Width, 50/667.0*Height)];
        //        文字
        self.wordsLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        self.wordsLabel.numberOfLines = 0;
        
        //        图片
        self.picView = [[UIImageView alloc]initWithFrame:CGRectMake(10/375.0*Width, 60/667.0*Height + self.wordsLabel.frame.size.height, [UIScreen mainScreen].bounds.size.width - 20/375.0*Width, self.y - 20/667.0/Height)];
//        [self.picView setBackgroundColor:[UIColor grayColor]];
//        视频
//        UIImage * im = [UIImage imageNamed:@"bofang.png"];
        self.voiceView = [[UIImageView alloc]initWithFrame:CGRectMake(10/375.0*Width, 90/667.0*Height, [UIScreen mainScreen].bounds.size.width - 20/375.0*Width, 70/667.0*Height)];
        //        [self.voiceView setImage:im];
        
        [self.contentView addSubview:self.voiceView];
        [self.contentView addSubview:self.imageview];
        [self.contentView addSubview:self.nameLabel];
        [self.contentView addSubview:self.wordsLabel];
        [self.contentView addSubview:self.picView];
        
    }
    return self;
}

- (void)setAlabelFrame
{
    [self.picView setFrame:CGRectMake(10/375.0*Width, 90/667.0*Height, [UIScreen mainScreen].bounds.size.width - 20/375.0*Width, _y - 20/667.0*Height)];
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

   
}

@end
